﻿using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Util;
using Kingdee.BOS.Core.Metadata;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Kingdee.BOS.Core.Metadata.FieldElement;
using Newtonsoft.Json.Linq;

namespace DevSamPle.FormPlugin
{
    [Description("【表单插件】BeforeEntryRowDataBinder 对单据体的某些字段进行特殊处理"), HotUpdate]
    public class CustBeforeEntryRowDataBinder : AbstractDynamicFormPlugIn
    {
        public override void BeforeEntryRowDataBinder(BeforeEntryRowDataBinderArgs e)
        {
            base.BeforeEntryRowDataBinder(e);
            if (e.Control.Key.EqualsIgnoreCase("FPOOrderEntry"))
            {
                var bindValue = e.Control.GetRowBindValue(new ControlBindValueArgs(this.View, e.RowIndex, e.RowData));
                var bv = bindValue[4];
                e.BindValue = bindValue;
                //e.BindValue[FieldAppearance.FS_VALUE] = string.Format("{0}-{1}", value, Context.UserName);
            }
        }
    }
}
